<div class="row">
	<div class="col-xs-12">
		<form id="set_permissions_form">
			<input type="hidden" name="role_id" value="{{ role_id }}">
			<table class="table table-bordered table-hover">
				{% for menu in permissionData.menus %}
					<!-- 一级菜单 -->
					<tr>
						<td rowspan="{{ menu.rowspan }}" style="text-align: center;vertical-align:middle;">
							<input type="checkbox" name="check_{{ menu.id }}" p_id="{{ menu.id }}" {% if menu.checked %}checked{% endif %}>{{ menu.title }}
						</td>
					</tr>
					{% for submenu in menu.subMenus %}
						<!-- 二级菜单 -->
						<tr>
							<td rowspan="{{ submenu.rowspan }}" style="text-align: center;vertical-align:middle;">
								<input type="checkbox" name="check_{{ submenu.id }}" p_id="{{ submenu.id }}" {% if submenu.checked %}checked{% endif %}>{{ submenu.title }}
							</td>
						</tr>
						{% for permission in submenu.permissions %}
							<tr>
								<td>
									<input type="checkbox" name="check_{{ permission.id }}" p_id="{{ permission.id }}" {% if permission.checked %}checked{% endif %}>{{ permission.title }}
								</td>
							</tr>
						{% empty %}
						{% endfor %}
					{% endfor %}
				{% endfor %}

			</table>
		</form>
	</div>
</div>